/**
 * 测试类
 * 测试懒汉模式是否运行成功
 * 2017/8/16.
 * @author Erik
 * @version 0.1
 * @since JDK1.8
 */
public class Test {
    public static void main(String[] args) {
        System.out.println("创建1号皇帝对象");
        Emperor first=Emperor.getEmperor();

        System.out.println("创建2号皇帝对象");
        Emperor second=Emperor.getEmperor();

        System.out.println("创建3号皇帝对象");
        Emperor third=Emperor.getEmperor();

        System.out.println("三个皇帝对象依次是：");
        System.out.println(first);
        System.out.println(second);
        System.out.println(third);

    }
}
